<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSalerLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('saler_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type', 16);//操作类型
            $table->string('operation', 16);//操作code
            $table->string('before', 16)->default('default');//操作前
            $table->string('after', 16)->nullable();//操作后
            $table->string('title',255)->nullable();//标题
            $table->text('remark')->nullable();//备注
            $table->integer('staff_id');//操作人ID
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('saler_logs');
    }
}
